﻿CREATE TRIGGER LoanCancellingDebtAttachments_Tracking_Delete
ON [dbo].[LoanCancellingDebtAttachments] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.LoanCancellingDebtAttachments_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.LoanCancellingDebtAttachments_Tracking s JOIN DELETED i
    ON s.LoanCancellingDebtAttachmentID = i.LoanCancellingDebtAttachmentID
END











